﻿using JQ.SAAS.Entity;
using System;
using System.Collections.Generic;
using System.Text;

namespace JQ.SAAS.IdentifyServer.Models
{
    public class LoginRequest
    {
        public string UserName { get; set; }

        public string PassWord { get; set; }

        public string LoginToken { get; set; }
    }

    public class LoginResult
    {
        public LoginResult(sys_user user)
        {
            this.sUserId = user.sId.ToString();
            this.sUserName = user.LoginName;
            this.NickName = user.NickName;
            this.sOrgId = user.sOrgId;
            this.sOrgName = user.sOrgName;
            this.LoginToken = user.LoginToken;
            this.Clamins = new Dictionary<string, string>()
            {
                { "sSex", user.sSexCode.ToString()}
            };
        }

        public string sUserId { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string sUserName { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string NickName { get; set; }

        public string sOrgId { get; set; }

        public string sOrgName { get; set; }

        public string LoginToken { get; set; }

        public Dictionary<string, string> Clamins { get; set; }
    }

    public class LogoutRequest
    {
        public string Token { get; set; }
    }
}
